
<?php

if(!empty($_POST)){
    $email = $_POST['email'];
    $password = md5($_POST['password']);

    $data = getSelectByOne('menber',"`email`='$email' and `password`='$password'");
    //
    if(!empty($data)){
        if($data['active']==1){
            $_SESSION['menber']=$data;
            header('location:index.php?c=index&a=index');
            $menber_id=$data['id'];
            del('active',"`menber_id`='$menber_id'",true);
        }else{
            echo "<script>alert('请激活帐号！');history.go(-1);</script>";die;
        }

    }else{
        echo "<script>alert('用户名或密码不一致');history.go(-1);</script>";die;
    }

    // if($data['active']==1){
    //     header('location:index.php?c=index&a=index');
    // }else{
    //     echo "<script>alert('请激活帐号！');history.go(-1);</script>";die;
    // }
}
//加载前台公共视图
 include (View_PATH.$admin.'/communal.html');

?>

